package com.ruoyi.jxgy.service.impl;

import java.util.List;
import com.ruoyi.common.utils.DateUtils;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.ruoyi.jxgy.mapper.JxgyTeacherMapper;
import com.ruoyi.jxgy.domain.JxgyTeacher;
import com.ruoyi.jxgy.service.IJxgyTeacherService;

/**
 * 教师信息Service业务层处理
 * 
 * @author hujiale
 * @date 2023-04-28
 */
@Service
public class JxgyTeacherServiceImpl implements IJxgyTeacherService 
{
    @Autowired
    private JxgyTeacherMapper jxgyTeacherMapper;

    /**
     * 查询教师信息
     * 
     * @param tchId 教师信息主键
     * @return 教师信息
     */
    @Override
    public JxgyTeacher selectJxgyTeacherByTchId(Long tchId)
    {
        return jxgyTeacherMapper.selectJxgyTeacherByTchId(tchId);
    }

    /**
     * 查询教师信息列表
     * 
     * @param jxgyTeacher 教师信息
     * @return 教师信息
     */
    @Override
    public List<JxgyTeacher> selectJxgyTeacherList(JxgyTeacher jxgyTeacher)
    {
        return jxgyTeacherMapper.selectJxgyTeacherList(jxgyTeacher);
    }

    /**
     * 新增教师信息
     * 
     * @param jxgyTeacher 教师信息
     * @return 结果
     */
    @Override
    public int insertJxgyTeacher(JxgyTeacher jxgyTeacher)
    {
        jxgyTeacher.setCreateTime(DateUtils.getNowDate());
        return jxgyTeacherMapper.insertJxgyTeacher(jxgyTeacher);
    }

    /**
     * 修改教师信息
     * 
     * @param jxgyTeacher 教师信息
     * @return 结果
     */
    @Override
    public int updateJxgyTeacher(JxgyTeacher jxgyTeacher)
    {
        jxgyTeacher.setUpdateTime(DateUtils.getNowDate());
        return jxgyTeacherMapper.updateJxgyTeacher(jxgyTeacher);
    }

    /**
     * 批量删除教师信息
     * 
     * @param tchIds 需要删除的教师信息主键
     * @return 结果
     */
    @Override
    public int deleteJxgyTeacherByTchIds(Long[] tchIds)
    {
        return jxgyTeacherMapper.deleteJxgyTeacherByTchIds(tchIds);
    }

    /**
     * 删除教师信息信息
     * 
     * @param tchId 教师信息主键
     * @return 结果
     */
    @Override
    public int deleteJxgyTeacherByTchId(Long tchId)
    {
        return jxgyTeacherMapper.deleteJxgyTeacherByTchId(tchId);
    }
}
